package com.christina.service.application.model;

import com.christina.engine.intent.model.Intent;
import com.christina.engine.decision.model.DecisionResult;
import lombok.Data;
import lombok.Builder;
import java.time.LocalDateTime;
import java.util.List;
import java.util.Map;

/**
 * 统一响应模型
 * 
 * @author Christina
 */
@Data
@Builder(toBuilder = true)
public class UnifiedResponse {
    
    /**
     * 请求ID
     */
    private String requestId;
    
    /**
     * 时间戳
     */
    private LocalDateTime timestamp;
    
    /**
     * 是否成功
     */
    private boolean success;
    
    /**
     * 响应内容
     */
    private String content;
    
    /**
     * 识别的意图
     */
    private Intent intent;
    
    /**
     * 决策结果
     */
    private DecisionResult decisionResult;
    
    /**
     * 业务处理结果
     */
    private Object businessResult;
    
    /**
     * 建议操作
     */
    private List<SuggestedAction> suggestedActions;
    
    /**
     * 错误信息
     */
    private String errorMessage;
    
    /**
     * 响应时间
     */
    private LocalDateTime responseTime;
    
    /**
     * 处理耗时（毫秒）
     */
    private long processingTime;
    
    /**
     * 元数据
     */
    private Map<String, Object> metadata;
    
    /**
     * 建议操作
     */
    @Data
    @Builder
    public static class SuggestedAction {
        private String actionId;
        private String actionType;
        private String displayText;
        private String description;
        private Object actionData;
    }
}